package com.sam.im.heiqun.entities.beans;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by zhangqiang on 2018/7/11.
 */
public class ImageInfoBean implements Parcelable {

    private String url;

    private boolean canForward;



    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public boolean isCanForward() {
        return canForward;
    }

    public void setCanForward(boolean canForward) {
        this.canForward = canForward;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.url);
        dest.writeByte(this.canForward ? (byte) 1 : (byte) 0);
    }

    public ImageInfoBean() {
    }

    public ImageInfoBean(String url, boolean canForward) {
        this.url = url;
        this.canForward = canForward;
    }

    protected ImageInfoBean(Parcel in) {
        this.url = in.readString();
        this.canForward = in.readByte() != 0;
    }

    public static final Parcelable.Creator<ImageInfoBean> CREATOR = new Parcelable.Creator<ImageInfoBean>() {
        @Override
        public ImageInfoBean createFromParcel(Parcel source) {
            return new ImageInfoBean(source);
        }

        @Override
        public ImageInfoBean[] newArray(int size) {
            return new ImageInfoBean[size];
        }
    };
}
